const MyPromise = require('./MyPromise')

let p = new MyPromise((resolve, reject) => {
    setTimeout(() => {
        resolve(1)
    }, 2000);
})

function p2 () {
    return 111
}

p.finally((val) => {
    console.log(111, val);
    return p2()
}).then(res => {
    console.log(res);
}, err => {
    console.log(2, err);
})
